package com.coolw.design.pattern.behavior.liabilitychain.controller;

import com.coolw.design.pattern.behavior.liabilitychain.dto.OrderCheckParam;
import com.coolw.design.pattern.behavior.liabilitychain.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单请求控制层
 *
 * @author coolw
 * @date 2024/10/22 19:57
 */
@RequestMapping("/order")
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping(value = "/check")
    public String checkOrder(@RequestBody OrderCheckParam param) {
        return orderService.checkOrder(param);
    }
}
